home *** CD-ROM | disk | FTP | other *** search
- var playtoframe = this._totalframes - 1 - this._totalframes * Math.random() / 2;
- var xspeed = Math.random() * 5;
- if(Math.random() > 0.5)
- {
- xspeed *= -1;
- }
- xspeed *= 0.8;
- this._yscale *= 0.6;
- this._xscale *= 0.6;
- var yspeed = 2 + Math.random() * 3;
- this.onEnterFrame = function()
- {
- this._x += xspeed;
- this._y -= yspeed;
- this._yscale *= 0.98;
- this._xscale *= 0.98;
- yspeed -= 0.6;
- if(this._currentframe >= playtoframe)
- {
- this._visible = false;
- _parent.unloadMovie();
- }
- };
-